(defpackage :game-page
  (:use :common-lisp :cl-who :ht-simple-ajax :hunchentoot)
  (:export :load-game-page))

(in-package :game-page)


(hunchentoot:define-easy-handler (game-page :uri "/game") ()
  (if (not (accounts:check-logged-in-session)) 
      (hunchentoot:redirect "http://localhost:8082/login"))
  (cl-who:with-html-output-to-string (*standard-output* nil :prologue t)
    (:html :xmlns "http://www.w3.org/1999/xhtml"
	   (:head
	    (:title "Turnbased game.")
	    (:body
	     (:center
	     (:h3 "Select your army"))
	     (:p :align "left" 
		 (:font :color "red"
		    "Your points: <span id = 'armyPointsLeft'>"(prin1 (hunchentoot:session-value :WORKED))"</span>"
		    )))))))

		   
